<?php //Play.php Lecteur multimédia.
require_once("../../config.php");
require_once("lib.php");

$id  = optional_param('id', '', PARAM_INT);
$url  = optional_param('$url', '', PARAM_URL);

//La partie experimentale de YUI qui contient SWFObject 1.5 sucks, alors on va taper ailleurs que dans moodle..
echo "<html>
		<head>";

echo "	<script type='text/javascript' src='./swfobject/swfobject.js'></script>";
echo "	</head>";

if(isset ( $id)){
    $podcast_item = get_record_select("podcast_structure", "id = $id", "lien");

	$html = get_media_html($podcast_item->lien);
}else{
    $html = get_media_html($url);
}

print $html;
    
echo "</html>";

?>